package cn.bdqn.service.impl;

import cn.bdqn.dao.FlowerDao;
import cn.bdqn.dao.impl.FlowerDaoImpl;
import cn.bdqn.pojo.Flower;
import cn.bdqn.service.FlowerService;

import java.util.List;

public class FlowerServiceImpl implements FlowerService {

    private FlowerDao fd = new FlowerDaoImpl();

    @Override
    public List<Flower> getAllFlowers() {
        return fd.getAllFlowers();
    }

    @Override
    public boolean addFlower(Flower f) {
        int count = fd.addFlower(f);
        if (count > 0) {
            return true;
        } else {
            return false;
        }
    }
}
